package com.zhenhe.core.batch;

import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Lazy;
//import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zhenhe.core.common.schedule.LockTable;
import com.zhenhe.core.common.utils.DateUtils;

@Service
@Lazy(false)
public class DemoBatch {

	private static final Logger log = LoggerFactory.getLogger(DemoBatch.class);
	
//	@Scheduled(cron = "0,30 * * * * ?")
	@Transactional
	@LockTable(tableName={"A_AREA","B_AREA"})
	public void demoBatch(){
		log.debug("batch运行:{}",DateUtils.formatDateTime(new Date()));
	}
}
